Remove ordereddict dependency for Python 2.7 and higher.

Forked from pull request #27.