Made package compatible with Django 1.4 and 1.5