copy from git://git.ghostscript.com/mupdf.git