won't compile due to pthread error