(Reuters) - The trustee seeking money for victims of imprisoned swindler Bernard Madoff has reached an agreement with the U.S. Internal Revenue Service (IRS) to recover $326 million that was earlier transferred to the agency by Madoff's firm purportedly on behalf of foreign account holders, court documents showed.