improve detection of macports root, fix #2093