Improved MacOS X build script to allow custom definitions such a deployment target and SDK through envirinment variables.