npwrapper: link against pthread on UNIX

should fix build while using -Wl,--as-needed