Fix linking on tests