Fix build

Declare a HOST_PTHREAD_LINKFLAGS variable to hold the flags
required to link with pthreads, and use it for the solver addon.

Works on GNU/Linux, please test and fix for other platforms.