Attempt to fix shared library build using old CMake.

CMake version prior to 2.8.11 does not have LINK_LIBRARIES target property.