Fix script.
Unset MACOSX_DEPLOYMENT_TARGET env var instead of CMAKE_OSX_DEPLOYMENT_TARGET CMake var because the latter doesn't work with subprojects.