Fix build on windows.
Use alloca instead of C99 variable length arrays.