add USE_GENERIC_MS_NINT support (#4617)