Fix compilation error on OSX.

I have tested build on OSX 10.8.