xcode: Don't set INSTALL_PATH unless target is SHARED_LIBRARY
An empty INSTALL_PATH will confuse Xcode, resulting in the archive action producing archives that can not be uploaded to the App Store.
The logic to pull out a install_name_dir only applies to SHARED_LIBRARY targets, so we can skip the setting of the property for all other targets.
There might be cases where the INSTALL_PATH code path will also end up setting an empty INSTALL_PATH, but it's unclear whether this is a problem, so to keep the patch minimal the existing code is left as is.
Fixes: #15183