Windows compilation working again

Note that this just is to get things working. Correctness is not
guarenteed at this point, although most changes are in the IC
generators. Still have to fix all the warnings at some point...