moved 'fake' DOM Image implementation to pdfimage.js and also make window.btoa safe to call