Make it work with Django versions < 1.5