Fix compilation issue on OSX
Merge pull request #240 from ShaoYuZhang/master

Fix compilation issue on OSX