Screengrab an application window in MacOS