Effective field theory approach to the Higgs lineshape