Added getopt functionality for MSVC and unistd.h for GNU