Fix for python 2.6 - dict comprehension changed

Using a generator expression and the dict() constructor now.