Use `#[link(cfg(..))]` in preparation for libstd

In preparation for rust-lang/rust#37545 this is adding the appropriate
directives to libc to get included.
diff --git a/src/windows.rs b/src/windows.rs
index b916fd4..6c8332a 100644
--- a/src/windows.rs
+++ b/src/windows.rs
@@ -146,8 +146,9 @@
 pub const EILSEQ: ::c_int = 42;
 pub const STRUNCATE: ::c_int = 80;
 
-#[cfg(target_env = "msvc")] // " if " -- appease style checker
-#[link(name = "msvcrt")]
+#[cfg(all(target_env = "msvc", stdbuild))] // " if " -- appease style checker
+#[link(name = "msvcrt", cfg(not(target_feature = "crt-static")))]
+#[link(name = "libcmt", cfg(target_feature = "crt-static"))]
 extern {}
 
 extern {