fix compilation with --disable-pthreads