Vaporization thermodynamics of MgB2 and MgB4