The Higgs transverse momentum spectrum with finite quark masses beyond leading order