Anonymity is the referee's right (or privilege), not an obligation.  I think the referee should be free to disclose his/her identity to the author.