Fix for shared library support