Fix for #1609 - backwards compatibility for django 1.3 as well