Thermodynamics of intermetallic phases with the triple-defect B2 structure