Fix a problem in django < 1.4.