fix issue 6952 - Pass linker switches to gcc instead of to ld