Build dicts in a Python 2.6 compatible way

The dict comprehensions don't work on Python 2.6.
So in case dropping 2.6 wasn't intended, this PR should restore compatibility.