Django 1.5 compatibility

There is a problem with InheritanceManager and select_subclasses using Django 1.5. It raises an exception caused by this commit https://github.com/django/django/commit/b90d4e5b749be3b6caec8ece7729beb3876ea4b8.