how magnesium help to prevent diseases