Fixed bug in IPython version detection