Backport part of r86217: Fix issues when building without threads
1 file changed