Use window onerror exception object if provided

Chrome provides an exception object for window.onerror that should be used instead of guessing. http://stackoverflow.com/questions/17687410/when-will-proper-stack-traces-be-provided-on-window-onerror-function