Fix novnc rendering when the window is detached