Decay of MHD waves by phase mixing