Try to use OrderedDict instead of SortedDict, which is deprecated in Django 1.7. Fall back on SortedDict if we are aren't on Python 2.7 or higher.
Merge pull request #157 from w0rp/master

Use OrderedDict where available instead