fix pthreads with gcc