Fix Django integration for versions older than Django 1.6. #33