added a support for the older version of ipython