#### Describe the bug

if the `httpsAgent` property is set, it is not excluded from `error.toJSON()` resulting in a circular reference error

```none
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    |     property 'httpsAgent' -> object with constructor 'Agent'
    |     property 'sockets' -> object with constructor 'Object'
    |     ...
    |     property 'errored' -> object with constructor 'Object'
    --- property 'config' closes the circle
    at JSON.stringify (<anonymous>)
```

#### To Reproduce

```js
const agent = new https.Agent({  
  rejectUnauthorized: false
});

axios.get("some-dodgy-url", {
  httpsAgent: agent
}).catch((err) => {
  console.error(err.toJSON())
})
```

#### Expected behavior

The error object should be serialisable as JSON without throwing circular reference errors.

#### Environment
 - Axios 0.26.0

#### Additional context/Screenshots

See [this StackOverflow post](https://stackoverflow.com/q/71150003/283366)
lib/utils.js
'use strict';
import bind from './helpers/bind.js';
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const kindOf = (cache => thing => {
    const str = toString.call(thing);
    return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
})(Object.create(null));
const kindOfTest = (type) => {
  type = type.toLowerCase();
  return (thing) => kindOf(thing) === type
}
const typeOfTest = type => thing => typeof thing === type;
/**
 * Determine if a value is an Array
 *
 * @param {Object} val The value to test
 *
 * @returns {boolean} True if value is an Array, otherwise false
 */
const {isArray} = Array;
/**
 * Determine if a value is undefined
 *
 * @param {*} val The value to test
 *