FindThreads: avoid failing in AIX when using -D_XOPEN_SOURCE=500
Current FindThreads fails in AIX (tested on 7.1 and 7.2) when using additional compilation flags (ex: -D_XOPEN_SOURCE=500) because the linker might need additional flags to link and those aren't yet known by the time check_include("pthread.h") is run.
Proposed change known to work both with XL and GNU.
Topic-rename: FindThreads-aix
Edited by Carlo Arenas