Moved code to conditionally include weakrefset into utils/compat/weakref.py