Work with peerDependencies

The `getInstalledModule` function fails when the target package has `peerDependencies`.