Potentiometric determination of calcium and magnesium in seawater