Add proper sending of ArrayBuffers via JavaScript XMLHttpRequest