change zmq version detection to use header macros.

This allows us to build vers.c without linking to libzmq. Running vers can fail at times
if the libzmq library has an install name of @executable_path/../ on darwin and we don't
match the intended bundle layout during the pip build.
(the same problem could potentially occur on linux with $ORIGIN)