Fix linking tests on OS-X