Convert freeserf.c to C++ style file

It is generally needed for the source file containing main() to be a C++ file even if other files are plain C. This change thus makes it possible for other files to be migrated to C++ as needed.