luarocks: fix --with-luajit build

Closes #25885.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>