tests: Make unit test building optional

Signed-off-by: Thomas Graf <tgraf@suug.ch>