fix #772

This PR relies on koreader/koreader-base#222.