Fix serialization pre Django 1.5