Add compile support for mac.