[CMake] Fixed missing TEST_LIBRARIES in MacOSX.