fix linkage for windows