use a js-btoa() version that is utf8-safe