Use defined(_POSIX_THREADS) to detect pthread support (#33609)
Use defined(_POSIX_THREADS) to detect pthread support (#33609)

Co-authored-by: Ben Rimmington <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@benrimmington.com>
nathawes/swift,ahoppen/swift,glessard/swift,apple/swift,xwu/swift,hooman/swift,parkera/swift,xwu/swift,CodaFi/swift,gregomni/swift,tkremenek/swift,JGiola/swift,tkremenek/swift,xwu/swift,nathawes/swift,ahoppen/swift,JGiola/swift,glessard/swift,atrick/swift,hooman/swift,rudkx/swift,CodaFi/swift,roambotics/swift,JGiola/swift,ahoppen/swift,jmgc/swift,glessard/swift,nathawes/swift,parkera/swift,nathawes/swift,xwu/swift,roambotics/swift,xwu/swift,benlangmuir/swift,atrick/swift,benlangmuir/swift,tkremenek/swift,apple/swift,atrick/swift,benlangmuir/swift,benlangmuir/swift,hooman/swift,glessard/swift,rudkx/swift,apple/swift,roambotics/swift,jmgc/swift,parkera/swift,atrick/swift,CodaFi/swift,nathawes/swift,hooman/swift,jmgc/swift,gregomni/swift,tkremenek/swift,benlangmuir/swift,roambotics/swift,xwu/swift,parkera/swift,glessard/swift,tkremenek/swift,gregomni/swift,jmgc/swift,parkera/swift,parkera/swift,atrick/swift,CodaFi/swift,ahoppen/swift,jmgc/swift,tkremenek/swift,jmgc/swift,rudkx/swift,hooman/swift,gregomni/swift,gregomni/swift,xwu/swift,rudkx/swift,apple/swift,hooman/swift,atrick/swift,tkremenek/swift,CodaFi/swift,nathawes/swift,CodaFi/swift,JGiola/swift,jmgc/swift,hooman/swift,parkera/swift,roambotics/swift,apple/swift,JGiola/swift,gregomni/swift,ahoppen/swift,apple/swift,glessard/swift,CodaFi/swift,parkera/swift,rudkx/swift,roambotics/swift,benlangmuir/swift,ahoppen/swift,JGiola/swift,rudkx/swift,nathawes/swift