Fix some more MSVC warnings
Use fprintf instead of g_fprintf when saving profiling info file

Otherwise we get an error in Visual Studio