MOBI Output: Fix regression that breaks conversion of some documents

Fixes #1188635 [Mobi conversion crashed](https://bugs.launchpad.net/calibre/+bug/1188635)