Work around MSVC's C99 support

1, `inline` keyword is only available in C++, define to `__inline` instead.
2, Visual C++ doesn't supply `snprintf` and  `strncasecmp `, define to `_snprintf` and `_strnicmp` instead.
3, define `_CRT_SECURE_NO_WARNINGS` to disable deprecation warnings.