JS Resolver API: Wrap base64 functions

Otherwise, we get TypeErrors