added window error handler to catch annoying silent errors in JavaScript