Optimize memory usage in library_gl.js

Optimize memory usage in library_gl.js to avoid unnecessary 2MB temp memory buffer from being created when neither FULL_ES2 or LEGACY_GL_EMULATION is defined. Depends on currently unimplemented #if A || B syntax.