Windows lib building fixes