Fix for SIGSEGV: Illegal storage access from lib/system/orc.nim nimIncRefCyclic
With nim version 2.0

```
nim c -r example.nim
```
fails with 

```
$HOME/.nimble/pkgs2/httpbeast-0.4.1-b23e57a401057dcb9b7fae1fb8279a6a2ce1d0b8/httpbeast.nim(83) eventLoop
$HOME/.choosenim/toolchains/nim-2.0.0/lib/system/orc.nim(46) nimIncRefCyclic
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Segmentation fault (core dumped)
```

Using:
```
nim -d:useMalloc c -r example.nim
```

Similar: 
https://github.com/nim-lang/Nim/issues/22546
https://github.com/nim-lang/Nim/issues/22255#issuecomment-1645057959 
