Also move the declaration of 'i' to the top for C90