Fix building of tests, and building libpkg under some cases

/usr/bin/ld: //usr/lib/libssl.so.7: invalid DSO for symbol `SSL_load_error_strings' definition

Issue:	#989
Fix pkg-search test.

The return status from pkgcli_update() needs to be improved.