Add darwin platform support
fix cmake
Merge pull request #4 from oranzhang/master

Add darwin platform support