H&M to close hundreds of stores as online shift accelerates