Role of Mg ions in modulating the morphology and structure of CaCO3 crystals grown in aqueous foams