Prosecutors: NY man aimed to fight with Islamic extremists