Build fixes under Windows