Windows building fixes