a plant requires magnesium for