Fixed up the "C port" of the 'KeyInjector' source code.

The following changes do compile, but they have not been tested. Some testing may be in order before you merge this. But then again, you already merged a C-compatible version without really testing it (Last time I checked, anyway) so... Merge at your own risk.

Everything I've tested was with Visual Studio 2013, and MinGW (Latest, and an older build based on GCC 3.4.5).

P.S. Someone really does need to change the extension to "*.c" instead of "*.cpp".