Use sched_yield() on Solaris systems.

According to the Linux manpage for sched_yield(), it should also be used
whenever _POSIX_PRIORITY_SCHEDULING is defined.