Effect of Mg 2+ on acidic calcium phosphate phases grown by electrodeposition