OSX build

fixes to build duke on OSX