Fixed function name

The 'ioctl' is actually named `ioctlsocket` on Windows.
Here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms738573(v=vs.85).aspx

Now everything compiles on Windows.
gcc 4.7.2 (MinGW)