Fix PTHREADs issues on buildbot.