New strategy: get C function pointers from dlsym, and pass those directly to pthread_create and _beginthread