Phase transitions in biogenic amorphous calcium carbonate