Fix linker not being correctly detected when a custom one is specified
through LLVM_USE_LINKER CMake variable.
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_LINKER=gold ../llvm
- Linker detection: GNU ld
- Linker detection: GNU Gold
due to the construction not accounting for such variable. It led to the general
confusion and prevented setting linker-specific flags inside functions defined