Rewrite the llvm::Linker fix for LLVM 3.3.

The previous commit changed the behaviour a bit. This solution should have an identical result.