PDF.js mode: fix for correctly detecting page unrendering events when the viewer is in HTML mode