compatibility fixes to Django 1.4.3