LLMMathChain 'VariableNode' object has no attribute 'factorial'. Please try again with a valid numerical expression

### System Info

langchain version 0.0.196
windows, wsl2
python 3.11.3

### Who can help?

@agola11

### Information

- [ ] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [X] Agents / Agent Executors
- [ ] Tools / Toolkits
- [X] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

Follow instructions on this page:
https://python.langchain.com/en/latest/modules/agents/plan_and_execute.html

Then run the following prompt:
```
agent.run("Who is Elon Musk in a relationship with? What is their current age factorial?")
```

### Expected behavior

It should plan out how to solve the problem (search significant other, search age, find factorial, respond) then execute each action and respond to the user. Instead, when it gets to the factorial part, it fails, claiming that there's no factorial function. Stacktrace:

```
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
File [~/miniconda3/envs/langchain/lib/python3.11/site-packages/langchain/chains/llm_math/base.py:80](https://vscode-remote+wsl-002bubuntu-002d20-002e04.vscode-resource.vscode-cdn.net/home/oriont/dev/langchain-phx/~/miniconda3/envs/langchain/lib/python3.11/site-packages/langchain/chains/llm_math/base.py:80), in LLMMathChain._evaluate_expression(self, expression)
     78     local_dict = {"pi": math.pi, "e": math.e}
     79     output = str(
---> 80         numexpr.evaluate(
     81             expression.strip(),
     82             global_dict={},  # restrict access to globals
     83             local_dict=local_dict,  # add common mathematical functions
     84         )
     85     )
     86 except Exception as e:

File [~/miniconda3/envs/langchain/lib/python3.11/site-packages/numexpr/necompiler.py:817](https://vscode-remote+wsl-002bubuntu-002d20-002e04.vscode-resource.vscode-cdn.net/home/oriont/dev/langchain-phx/~/miniconda3/envs/langchain/lib/python3.11/site-packages/numexpr/necompiler.py:817), in evaluate(ex, local_dict, global_dict, out, order, casting, **kwargs)
    816 if expr_key not in _names_cache:
--> 817     _names_cache[expr_key] = getExprNames(ex, context)
    818 names, ex_uses_vml = _names_cache[expr_key]

File [~/miniconda3/envs/langchain/lib/python3.11/site-packages/numexpr/necompiler.py:704](https://vscode-remote+wsl-002bubuntu-002d20-002e04.vscode-resource.vscode-cdn.net/home/oriont/dev/langchain-phx/~/miniconda3/envs/langchain/lib/python3.11/site-packages/numexpr/necompiler.py:704), in getExprNames(text, context)
    703 def getExprNames(text, context):
--> 704     ex = stringToExpression(text, {}, context)
    705     ast = expressionToAST(ex)

File [~/miniconda3/envs/langchain/lib/python3.11/site-packages/numexpr/necompiler.py:289](https://vscode-remote+wsl-002bubuntu-002d20-002e04.vscode-resource.vscode-cdn.net/home/oriont/dev/langchain-phx/~/miniconda3/envs/langchain/lib/python3.11/site-packages/numexpr/necompiler.py:289), in stringToExpression(s, types, context)
    288 # now build the expression
...
     93 return re.sub(r"^\[|\]$", "", output)

ValueError: LLMMathChain._evaluate("
math.factorial(33)
") raised error: 'VariableNode' object has no attribute 'factorial'. Please try again with a valid numerical expression
```