[WO-406] use js-only decoder for base64 instead of using window.atob

JSPerf test case: http://jsperf.com/base64-decoding