Several fixes to the mac branch for installing.