changed define in getopt.h to prevent mingw from compiling due to the header file including itself.
added memory allocation for mutex and semaphores in vos_winThread.c to avoid segfaults.
changed mutex creation so that the creation thread doesn't already lock it, which would lock other threads waiting for them.