Create compatibility function for iteritems