Replaced C99 variable-length array with an alloca to work with MSVC.