Added check for `os.getenv` for those platforms that don't implement it.
Removed a safety check dead code that is no longer needed.
Added support for debugging Lua 5.2 scripts.