lib: use primordials when calling methods of Error global object
This is to unsure that code using those methods won't crash if the methods are deleted in userland.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines