Added checks to build script to detect MacOS and to
build Mac and iOS if the correct tools are installed