Fixed compiling CMake project under MSVC.
Merge branch 'master' of https://github.com/kainjow/greg
Added getopt() implementation for MSVC.