Conditional loading of PDF.js