Only run the gold plugin tests if gold supports the targets we test with.

This fixes pr21345.