fix several issues that may prevent builds from working on Windows

Also updates Gaia to 2013-04-15