more linking fixes for windows