Fix test failures --without-threads.