Win32: Work around bug in C99 parser

Visual Studio has a rather unfortunate bug in its parser which prevents
you from having variable declarations where the type name is a typedef
directly after an if statement without braces. For example, the
following will cause a parse error:

typedef struct Foo Foo;

...

if (x == 0)
    x = 1;

Foo *foo = ...

The solution to add braces around the if statement body, or (in the case
of a struct) to use 'struct Foo' instead of just 'Foo'.

There's quite a lot of code that will need to be changed to avoid this
bug; this commit just addresses the core functions in lib/*.c.