Adding support for reporting global javascript errors