Gordon Brown insists Afghan campaign was 'prosecuted out of necessity' to protect UK and world from terrorism