fix linking errors on windows