Made migrations compatible with custom user models in Django 1.5+.