Update synthFunc to implement types.Object again

Hopefully a bit more robust to changes in go/types.