Add back-compatibility on has_auto_field -> needs_explicit_pk_field fix

With 457c474 commit, the compatibility with Django 1.5 was lost. We must use Django 1.5, so we add this fix to maintain back-compatibility.