Added btoa shim

This PR fixes #505. I had some other reports of people not being able to upload files because of a missing btoa too, so this should fix that too.