iOS 8 fix

- Make sure the key window after dismissing form sheet is the main
window of the application
Merge pull request #117 from emrsn-mihailpopa/master

iOS 8 fix