Python3 workaround for dict.iteritems