Make WebKit wait until page is loaded