Replace functions not available in IE8

Make sure errors caught at window.onerror goes to kadira
I checked the jQuery code, they don't have it.