Send completion event when using 'non-native' XHR

When using a "non-native" XHR runtime (even HTML5 XHR which really is native) the "readystatechange" callback is not called when the transfer is complete. This patch fixes this problem.