fopen_s workaround

Attempting to use preprocessor macro to replace fopen_s() with fopen()
if Visual C++ version is below 2005; also switch from error_t to int,
since they are the same and VC6 headers don't define error_t
macro test

fopen_s() -> fopen() preprocessor macro