Few CMake improvements and MSVC support for C99 sampes.