fix the freebsd build
reapply fix for

WARNING: Linking two modules of different target triples: [...] is 'x86_64-unknown-linux-gnu' whereas 'ld-temp.o' is 'x86_64-pc-linux-gnu'