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