As suggested by @comradekingu in https://github.com/koreader/koreader/pull/3165#issuecomment-326795203