Implement proper URL detection for recent PDF.js versions. Closes #72.