Recognize shared libraries when linking