Self-supervised Learning is More Robust to Dataset Imbalance