Django 1.5 custom user model compatability

This allows users of tastypie to user the custom user model if they are using Django 1.5, but provides backward compatibility with previous Django versions.