Fixed compile error on OSX