Fix bug with upgrading from Django 1.4.x to 1.6.x