fixed cmake on OSX/Linux