Modify CHECK_C_SOURCE_* checks to fix builds using Visual Studio 12.

This is needed to fix build failures using Visual Studio 12 and using libraries such as liblzma which
have been built without the "/SAFESEH" linker flag (which is the usual case for libraries built using
the mingw toolchain).
Set use of /SAFESEH linker flag for all LIBARCHIVE_CHECK_C_SOURCE_* checks.
Fix test failures in libarchive built using Visual Studio.

Negating "sizeof" operator requires casting to appropriate primitive data type, in this commit, a cast to int.