Add ability to build iOS and macOS frameworks with nonfree modules (#13424)
* Allow building ios framework with nonfree
* Allow building osx framework with nonfree
Without it set, the build will choose the current OS version as the deployment target. 10.9 is the earliest usable, since that is when OS X introduced libc++.