gnuplot: add missing dependencies

Working on #27935.