lua: fix some warnings from implicit int->bool (lua_toboolean)