Use iteritems from the six module for Python 3 compatibility