fix compile error under Mac OS X
Merge pull request #234 from bbiao/master

fix compile error under Mac OS X