The script sets LYNX_PATH=/usr/local/bin/lynx while # which lynx gives "/usr/bin/lynx" as output. Why not simply set LYNX_PATH=$(which lynx) out there?
with app-text/xmlto-0.0.28-r1 I get it pointing to the proper place