Support custom user models in Django >= 1.5

--HG--
extra : amend_source : 89f0799cbcf82e9a8f17a25e115f92d886d8d0af