Build dicts in a Python 2.6 compatible way