Make compound.py aware of 'env' and 'Undefined'
'serialize_when_undefined' for 'to_native'