add compile option for MacOS