fix import error on itertools.imap with Python 3

`itertools` in Python 3 doesn't have `imap` since `map` does just like that.