Fix calls to publish_display_data for newer versions of IPython