Fix pass-by-reference of int to pthread_create()