fix compile error on OSX