Major solar flares and long-term variability in Antarctic ice cores