Polyfill doesn't work in all browsers except IE

In all browsers except IE script doesn't work because of IE versions detection. Variable "ie" is undefined for other browsers and incorrect onreadystatechange initialization is using.