Handle an edge case where sys.stderr and sys.__stderr__ might already be closed when faulthandler is tearing down.