fix issue #780 - Pass linker switches to gcc instead of to ld