completed detect_pkgs() for OSX w/ homebrew support