Issue #16982: Fix --without-threads build failure.