lftp: use std env

Closes #18749.