Add Python3 version check to accommodate 2to3 change of itertools.izip_longest