More robust check on django.VERSION