Properly link with zmq stuff in tests.

When running the tests we were dynamically linking with the
installed versions of these libraries rather than the just
compiled versions as we should be.

Thanks go to Raymond Wagner for identifying the problem.