Prior to macOS 10.13 and iOS 11, defining POSIX_C_SOURCE before
including <thread> resulted in hard-to-understand errors. That
definition causes a bunch of important definitions from the system
headers to be skipped, so users see failures like "can't find
mach_port_t".
This patch adds a friendly warning message about the issue.
rdar://problem/31263056
Please add a brief comment that describes why the check and the warning are needed.