I somehow managed miss including one of the upstream changes in PR 6489; hence this patch. Sorry about the unnecessary churn in this code!
This is the pdf.js project output, https://github.com/mozilla/pdf.js Current extension version is: PDFJSSCRIPT_VERSION