[Gnu] Set the type of binary that lld would generate.

This is needed before any of the search paths are searched for.