I was under the impression that at least the CRT part was fine to modify. At least, Firefox used to ship a custom version with jemalloc, I think (with the necessary patches checked in as ed scripts so that they could avoid having the original source in the repository).