Python 2.6 compatibility (no dict comprehensions in Python 2.6)