Use pthread on Darwin.