A few fixes in build system.

Those are trivial patches to 1) obey USE_WEBP option, 2) find lua on system where pkgconfig name is lua-5.2 (freebsd only?).