Fix build error.

I build error both Linux and OS X. After this changes, I build it successfully. Fix #1