Provide fallback for Django 1.6

This variable started to exist in Django 1.7.

Signed-off-by: Michal Čihař <michal@cihar.com>