Updated postinstall script to work correctly on iOS 8