only search for pthreadGC2 when cross-compiling (fix #3588)