FBI director counters Trump’s attacks on his agency