make install_jsregexp fails with linker errors (undefined lua_* symbols) if one has only LuaJIT but not regular Lua installed.
Line 99 in the Makefile appears to hardcode against Lua 5.1: -llua51.
Workaround:
make install_jsregexp LUA_LDLIBS="-lluajit-5.1"