'IRA kidnap victim' was agent for police, court told