Preparation of magnesium carbonate