lua: refactor without _G._COMPILER