Shahawar Matin Siraj told a Brooklyn , New York courtroom that he planned the attack only after a police informer stoked his anger against the United States .