[MPS] Make it compilable with either xCode or CLI (#79430)
`xcrun --sdk macosx --show-sdk-version` works with either CommandLineTools or Xcode, but `xcodebuild -sdk macosx -version SDKVersion` works only if full Xcode is installed, which is not necessary to build PyTorch
Above command yield the same output when Xcode is installed:
```
% xcodebuild -sdk macosx -version SDKVersion
12.3
% xcrun --sdk macosx --show-sdk-version
12.3
```
But first one fails if Xcode is missing:
```
% xcodebuild -sdk macosx -version SDKVersion
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
% xcrun --sdk macosx --show-sdk-version
12.3
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79430
Approved by: https://github.com/albanD