[test] fix linking own lib in tests