macOS bundling needs executable scripts to be handled better by CMake than they were in the past. Until we require 3.14 or newer, bring in the modules from https://github.com/Kitware/CMake/commit/45ed314bfff5b9b59dcba8139ab1c695a81a05f3.