Fix build system in C examples

Some problems with the build have been arised since a recent patch.

Also, although I can't compile the changes in a Windows machine, I think that inclusion of time functions were totally wrong, both in POSIX and Windows worlds.  If you can verify it by compiling at Windows, it would be great!