fixed TypeError in compile_messages() due to Django 1.6 change