Move non-portable thread check guards to specific platforms that use it.
Merge pull request #2298 from SickheadGames/ThreadCheck

Move non-portable thread check guards to specific platforms that use it.