Putting the Mac build into a function to help scope any variables.