Try to fix crash on calling glGetString() without a GL context.