Simplify passing of linker flags to try_compile calls

Drop custom copies of the CMake CheckCSource(Compiles|Runs) modules and instead pass /SAFESEH through the LDFLAGS environment variable to try_compile calls.