Ex-FBI veteran agrees to plea deal in al Qaeda leaks case