build: restore the '-static' linker flag for the test suite
build: restore the '-static' linker flag for the test suite

Commit a69776395367 ("build: add basic code coverage support") added
support for code coverage but removed the '-static' linker flag from
the test directory which makes debugging tests much more difficult.
Unfortunately, we can't simply restore the '-static' linker flag as
it causes problems with the code coverage tools, so make it dependent
on the '--enable-code-coverage' configure flag.

Signed-off-by: Paul Moore <a027184a55211cd23e3f3094f1fdc728df5e0500@paul-moore.com>

seccomp/libseccomp,seccomp/libseccomp,seccomp/libseccomp