pthreads are now required, so add appropriate checks to the build system and set the compile flags accordingly. closes #98