[osx/ios] fix the configure script to retrieve correct xcode path if xcode not in default location

fix the configure script to retrieve correct xcode path if xcode not installed in the default location