configure.ac: Improved Lua detection

Look for lua-5.2 and lua-5.1 too, as the pkg-config module is called
like that on FreeBSD, for example.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>