libfetch: sync with freebsd