On the projectivity of the moduli spaces of curves