Replace functions not available in IE8

Make sure errors caught at window.onerror goes to kadira
Merge pull request #54 from mnmtanish/ie8-error-tracking

Replace functions not available in IE8