fix pthreads support