remove pthreads, successfully tested on gcc 4.9.1 without pthreads