The MOSDEF Survey: The Variation of the Dust Attenuation Curve with Metallicity