Fixed a crash if creating accelerated renderer after accessing window surface. Partially fixes Bugzilla #3196.