Fix xcode version comparison

Xcode version can be 3 numbers separated by dot or 2 numbers separated by dot. `versionCompare` function  expects versions in same format. We cannot use `semver` module because it throws error for versions in "x.y" format.
it is possible that xcode version goes above 10. I would feel much more comfortable if you combine the first two parts from the split string or using a regular expression like /(d+\.d+)/ (to capture the first two number parts).