H&M Hennes & Mauritz has recorded first-quarter profit growth, but admitted that gross margins were hit by higher costs and increased markdowns.