Added option to compile without PTHREAD support.