Replace functions not available in IE8

Make sure errors caught at window.onerror goes to kadira