tree: don't rely on $CC being set in the stdenv build environment

Fixes https://github.com/NixOS/nixpkgs/issues/5214.