Revisions to support OSX build