Added configure option to disable pthreads