Second Circuit affirms sentence of would-be terrorist