Some Mac build fixes