This is needed since Visual Studio does not support variable-length arrays from C99. The array size must be static - so I threw it in in a form where small arrays would use a static one, and large ones would get an allocation.