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.
Merge pull request #2523 from juj/lib_gl_mem_opt

Optimize memory usage in library_gl.js