Comparison of the calcium- and magnesium-induced structural changes of troponin-C