Driver: Factor gold support out into a function

AddGoldPlugin() is the same on gnutools and freebsd so avoid the
copy-and-paste duplicate code.

No change in functionality.