fixed build on OSX