Lua test files 2 and 3 fail when threads are disabled because of a "nbthread" statement that seems to be a leftover from an ancient configuration. One of them even mentions a commit message showing a reproducer not involving threads. Let's clean this up so that running the tests without threads also works. This should be backported to 1.9 as the problem also exists there.