Fix the `agent: null` http agent regression

See the individual commit messages for more details. I'd be fine with squashing this as well if you guys think that would be better. /cc @tjfontaine @indutny @bnoordhuis