Fixed debugging on/off handling in 'main' thread for LuaJIT.