The Picard groups of the moduli spaces of curves