Adding 'timeout' handling to `XMLHttpRequest` shim