Fix macosx build