use pkg-config to detect cflags

This makes it easier to select which Lua version we build for.