Split the build script so one, hopefully, works on mac machines.