Fix compilation against Lua52 with compat turned on