Fix a runtime error when getting GraphicsCapabilites in Linux