build: improve Lua lib search, output library versions