updates to allow for consistent threading primitives when gcd_libdispatch is used, and default to pthreads