Add a temporary fix for X11 and Win32 crash