Add @benoitbryon's code back to pip/operations/freeze.py