Vanishing of the conformal anomaly for strings in a gravitational wave