Two men accused of being agents for Iran have been charged after allegedly spying on Americans and a Jewish center in Chicago.