use pkg-config to find paths for more systems

Fixes the build for fedora19 x64, and maintains compatibility with
OpenWrt builds. Removes direct linking to liblua as well, as recommended
by http://lua-users.org/wiki/BuildingModules

Signed-off-by: Karl Palsson <karlp@tweak.net.au>