link against -pthread to fix underlinking issue

Please see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773341 for more information. libuv uses some of pthread's symbols, but it doesn't link against it, which causes underlinking issues, especially in Ubuntu where we use ld --as-needed. The issue also shows up as warnings in Debian's build logs.