Phase transitions in twin Higgs models