fixes compatibility with django 1.4.x~trunk