[MacPlatform] Fix modal window detection in Yosemite.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=21148