Now works with Django versions >= 1.5

Since version 1.5 of Django, QUERY_TERMS was made into a set rather than a dict