Fixing byob TypeError: Constructor TextEncoder requires 'new'