Fix detection of Lua 5.2 library