Added some NetBSD specific code to druntime (core.thread).