<python-2.7 support of io.spec with backport of ordereddict