Generative models improve fairness of medical classifiers under distribution shifts