Fix for WM detection in OS X.