Using proper way to get user model

Keeps backward compatibility with django < 1.5