FIX: Support IPython 2.x and upcoming 3.x