adds compatibility fallback for ArrayBuffer and Uint8Array