make toBeFocused compatible with PhantomJS (fix #107)