Removed C99 dependencies (for-loop declarations) - better for MSVC