Django 1.5 fix to ensure compatibility with older versions.