Fixed so that it builds with VS2013. VLA:s are not supported, because of its strict C89 world view.

 This is #1574, re-done to be more minimalistic.