Fix for MSVC and GCC build