Made pthread support optional