build: fix regression in cross-compilation

Regression was introduced in bf90317ad in an attempt to fix the Lua check.