Small fixes to get Mac build working correctly