Updates to work with node-XMLHttpRequest