Make it possible to provide special (linker) flags for the thread tests.
Use it to build & link against libpthread on NetBSD for tests iff they
are testing the thread interface.