[Fixes bug #1181456] Handle the re-opening of minimized windows on OS X.

This is based off how MonoDevelop works:
https://github.com/mono/monodevelop/blob/master/main/src/addins/MacPlatform/MacPlatform.cs