core: fix MSVC's lack of support for C99 variable length arrays