MacOS fixes for headless compile against brew ports.