use sched_yield instead of pthread_yield. Fixes #7