fix XMLHttpRequest in chrome is notdefined