Precipitation of magnesium hydroxide