use a js-btoa() that is utf8 safe (fixes #36)