Restore compatibility with Django 1.2 & 1.3