Fixed misaligned structure cast

zmq_event_t is often padded (due to a uint16_t as its first member), and thus you cannot re-interpret bytewise packed message buffers as zmq_event_t, it must be read manually. This was resulting in the value always being garbage, which is troublesome if you wish to inspect a SOCKET, for example.
Merge pull request #38 from justinboswell/master

Fixed misaligned structure cast
Fixes backward compatibility with zmq 3.x

The code added in 'Fixed misaligned structure cast' implicitly assumes zmq 4.x, since it relies on new fields in zmq_event_t structure. This commit re-introduces the previous code if zmq < 4.x is detected.
Merge pull request #39 from zbierak/master

Fixes backward compatibility with zmq 3.x
Problem: zmq_event_t removed in libzmq v4.1

Solution: define this if we need it, so that caller can use it
on all versions of libzmq.

Fixes #40
Merge pull request #41 from hintjens/master

Problem: zmq_event_t removed in libzmq v4.1