Don't allow to set hook if main_state is not available Remove Lua 5.1 dirty hack
This feature works on lua54, lua53, lua52 and lua51 only. LuaJIT is unstable.