…a5a2 Use the ar utility provided by the BBNDK
avoid build errors on the Mac.
Use environment variables provided from the BBNDK installation.
script instead of sourcing from our own script.
Fix build failure and make variables local
build to fail. Put commands into a function to allow variables to be made local. This prevents trampling of the same variables when the build script is called by the CouchDB script.