Add --with-lua52 flag, fix build breaker

 * Plus, very silly workaround for configure.ac failure