Several MSVC fixes

Also, I didn't touch the VC++ project, but it definitely might be useful if you could take the solutions I've made here https://github.com/winlibs/json-c/tree/master/win32 in account.