Add missing libraries while linking tests
Merge branch 'dev-merge' into freebsd