depends: fix already installed check on osx

Avoid depending on .so files which could be .dylib on osx
Fix some invalid dependencies