Fix import for Python < 2.7 with Django's SortedDict