osdep: potentially fix compilation on OpenBSD

The <pthread_np.h> header expects that <pthread.h> was already included.
We were including <pthread.h> only later via our threads.h.