Fix hopefully all build issues for mac os