A man accused of planning a terror attack at a New York City Jewish center was arrested in Canada, officials say.