ImportError instead of NameError for Django < 1.7

When the app is used with a Django version < 1.7 we have to check for an ImportError instead of a NameError.

Thank you for this useful Django app!