Fix the api-example.c compile under Linux
Merge pull request #494 from xiangfu/master

Fix the api-example.c compile under Linux