Thermodynamics of the electroweak phase transition