glsl: hide assert code behind NDEBUG instead of DEBUG
This was effectively hidden behind both, as assert() are no-ops on NDEBUG
builds.
Instead of compiling an empty loop on debug builds with assert disabled, let's just make that conditional on having asserts enabled.