Fix compilation with glibc by adding pthread linker flag. Signed-off-by: Rosen Penev <rosenp@gmail.com>