Removed redundant #defines for -D_WIN32 case
Added #define close(x) _close(x) for WIN32 to squash warning 4996 that VS2013 gives