fixed TypeError in compile_messages() due to Django 1.6 change

This allows installation when using Django 1.6, and retains compatibility with earlier versions.