American journalist formally accused of spying