only capture stack trace if the browser supports it