Move GLDEBUG check in gmain.cpp to platform.h (#008)