serf: pass build variables

Fixes #21434.
gnuplot: fix LuaRequirement