[ipython] Fix IPython.terminal check

For people running with older IPython