Confinement effects promote the formation of aragonite