improve SetCaptureStackTraceForUncaughtExceptions()