Fixes for nbconvert under Python 3