Only prepare pre-requisites for the current SDK/platform

If you do not have one of the platforms (iPhone or MacOSX) installed, the prepare.sh script stage of the build fails. Also, if you are only building for Mac _or_ iPhone, it makes sense to only build the pre-requisites for a single platform.

Note, you'll have to squash my three commits, because I had to revert the first attempt, when I accidentally included a change I didn't want to.