Fix initialization failure in non-browser windows