Fixed dependencies not working for shared libraries.