Thermodynamics of a complex melting process: the case of spironolactone