Misc fixes

I haven't had a chance to really try these yet, but at least it builds against zmq 3.2 and the tests pass.

I didn't make the UInt64 -> Int64 change for zmq 2.x so that there won't be needless build regressions for users.