fixes #86: getWindowHandle not synchronous