Implement our own 'which' since some systems' implementations are broken. Check that the linker gcc uses is GNU ld.