Added encoding param for atob and btoa compatibility

This fix browser client side compatibility.