Initial support for pthreads

Raw pthreads instead of Boost's threads