This reverts commit b62b7a42 and a5729b71. This commit broke compilation for systems that lack pthreads.