Compile libcurl only for iOS

Mac OS X already has libcurl included
Call darwin-ld to detect possible errors

Let the script fail if darwin-ld has a serious problem (like missing
libraries) instead of generating invalid content for the LINKER_VERSION
variable