fix compile on OSX