Improved compatibility with Lua5.2 to run the IDE.
Fixed warnings from static analysis.