Updated interface to call web view methods on the main thread.
Should work on newer OS versions.