Fix CMake unable to locate Lua

Fix for #7961