Fixed windows build

Also fixed a few incompatibility issues between TivaWare and
StellarisWare.