Only capture stacktraces if available

- Firefox doesn't support this method so we should feature detect it so
as not to break errors in ffos