Fixed compile error under OS X