Properly link shared library.