Further work on MacOS port. See INSTALL.MacOS for details.