fix getting and setting cpp version for brew