Check for XMLHttpRequest obj

for backwards compatibility