Added support for older ipython versions