gnuplot: allow lua 5.1 or 5.2

Closes #19565.