Kinetic determination of magnesium and calcium by stopped-flow injection analysis