Use non-blocking sockets on platforms without SOCK_NONBLOCK (Win32, OS X, iOS)

Hello Stephane,

Thanks for the clean library.

I needed nonblocking sockets on platforms that do not support `SOCK_NONBLOCK`. I have not played around with the test suite yet and I cannot be specific about what I am doing (sadly). Maybe you or someone else will find this useful :)

What would be needed to get this code merged? Would using `fcntl` with `O_NONBLOCK` be more portable? I have little experience outside of the Apple & Win32 worlds.

The Win32 code is the same as mentioned in a comment on an old pull request:

http://github.com/stephane/libmodbus/pull/19#issuecomment-2359113