Add missing libraries while linking tests