Add ant/cmake script to make build on Mac machine, and fix build error on Mac platform.