I was trying to test libidn with clamav because it was listed in the dependcies. I had trouble cause it really doesn't depend on libidn. I this was verified in all three clamav versions in the gentoo tree.
Check bug #84700, which I have resolved by simply adding libidn unconditionally, since at that time, clamav binaries were being linked with -lidn (as seen there). I think that the libidn link was added by some other dependency. Looks like that is not true anymore, as none of my gentoo boxes have clamav binaries linked to libidn. I'll remove libidn from clamav deps.
All three versions fixed in CVS, thanks for reporting.