Cosmological phase transitions in composite Higgs models