I'm thinking about moving all these globals that we're using to PDFJS.config so they're easy to forward to the worker (in another PR).