Fix ImportError with IS_POPUP_VAR for django>=1.5,<1.6

ImportError: cannot import name 'IS_POPUP_VAR'