Fix linked dependencies in windows, fixes #813.