Make onClose and onDestroy available on both iOS and Android.