Generalized Hodge classes on the moduli space of curves