Avoid using Python OrderedDict for compatibility with Python 2.6.x