python: use dict if OrderedDict is not available.