backport https://github.com/dompdf/dompdf/pull/744

necessary to fix https://github.com/owncloud/core/issues/7880

please review @DeepDiver1975