Use ucontext.h for glibc

It's way faster than pthreads, but it's deprecated and not always available.