Workaround crash in iOS 8

Without the workaround, the app crashes with the following error messages:
* Trying to dismiss the presentation controller while transitioning already.
* transitionViewForCurrentTransition is not set, presentation controller was dismissed during the presentation?