Move WebView method call back to the main thread. Fixes #1057.