cmd/gomobile: improve Xcode check

Since the xcrun binary exists in macOS from the beginning, it can not be used to check that Xcode is available.

The xcodebuild command does not return an error if Xcode is available.

Reference https://go-review.googlesource.com/c/mobile/+/35852

Change-Id: Ibb6324a2d801eab47b3544c50ee1cdbc36b608bc
Reviewed-on: https://go-review.googlesource.com/88755
Reviewed-by: Elias Naur <elias.naur@gmail.com>
diff --git a/cmd/gomobile/env.go b/cmd/gomobile/env.go
index c564a43..a87c332 100644
--- a/cmd/gomobile/env.go
+++ b/cmd/gomobile/env.go
@@ -371,6 +371,6 @@
 }
 
 func xcodeAvailable() bool {
-	_, err := exec.LookPath("xcrun")
+	err := exec.Command("xcrun", "xcodebuild", "-version").Run()
 	return err == nil
 }