Compatibility fix for JSON emitter with Django 1.5