added update code from mupdf tag 1.3