Use correct thread type on OSX