Constraints on Lorentz-invariance violation with the HAWC observatory