Cleaned up and improved iOS openssl build script

* Added support for optional build directory (first argument)
* Automatically detect iOS/iPhoneSimulator SDKs (oldest SDK found is used)