Applied some changes for MuPDF 1.4