Compiles with lua5.2 even without LUA_COMPAT

Also keep global namespace clean when compiled against lua5.2