Thermodynamic derivation of Saha's equation for a multitemperature plasma