The initialization order of global data structures in different implementation units is undefined. Making use of this is essentially gambling on what the linker does, the so-called Static initialization order fiasco.
In this case it apparently worked on Linux but failed on OpenBSD and FreeBSD.
To create it on first use, make the registration structure local static to a function.
Fixes #8910. (tested on Linux, OpenBSD, FreeBSD)