Changes to support pre-C99 compilers (msvc)