Fix for macosx build