JS Resolver API: Wrap base64 functions

Otherwise, we get TypeErrors
Merge pull request #248 from lorenzhs/fix-base64

JS Resolver API: Wrap base64 functions