Fix #5920 (#5922)
Fix #5920 (#5922)

* Use native `getthrid` on OpenBSD.
* Use NetBSD specific primitive to get thread id
tulayang/Nim,dom96/Nim,dom96/Nim,tulayang/Nim,tulayang/Nim,russpowers/Nim,dom96/Nim,dom96/Nim,russpowers/Nim,russpowers/Nim,russpowers/Nim,russpowers/Nim,dom96/Nim,russpowers/Nim,tulayang/Nim,russpowers/Nim,dom96/Nim,tulayang/Nim,dom96/Nim,tulayang/Nim