polyfill TextEncoder in Chrome