Build with -pthreads if the compiler supports it.
Build with -pthreads if the compiler supports it.

For one, this is needed on Solaris, to prevent breakage in
multithreaded programs.

Signed-off-by: Lennert Buytenhek <8858498612e3a522354216649776e3032dcb7e5b@wantstofly.org>

buytenh/ivykis,buytenh/ivykis