"import collections" also works on Python 2.6 but
collections.OrderedDict() is not available so the current check is
wrong. Using a function to get an OrderedDict() instance works fine for
that.
Closes-Bug: #1375568
Change-Id: Iaf739dc2deb7d4b09bf477be60de4df8c4fcf5c0