Automatically detect selected xcode sdk (fixes compatibility with xcode6)