Detect iOS SDK version in build scripts

This should fix the failing Travis build.