compilation: fix compilation bugs for windows