add basic pthread support