magnesium and thyroid