Fix compilation with Visual Studio

Visual Studio does not have 'unistd.h', so exclude it when compiling on Windows.
It also seems to not be necessary on OS X (tested on 10.8). If no symbols from 'unistd.h' are used it would be better to completely remove it.