Mac build fixes