Django 1.7 compatibility.

This change will allow django-guardian to be compatible with Django 1.7 and the new app registry.