Fix iterating dict values for Python 3.