Fixed shared context crash on windows.