Enable connection to pdf.js environments

Allows connection to the "resource://pdf.js" origin, which is required for talking to PDF.js.
Fixes #20.