use pthreads for system() in glx.c