Fixed shared library linking