[runtimes] Use _LIBCPP_HAS_COMMENT_LIB_PRAGMA in all relevant files

These two sources were omitted in r362055.

llvm-svn: 362061
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: b19977d5afbff801b3228d89b14147397a935ffe
diff --git a/src/condition_variable.cpp b/src/condition_variable.cpp
index 69264c6..8d769f4 100644
--- a/src/condition_variable.cpp
+++ b/src/condition_variable.cpp
@@ -15,7 +15,7 @@
 #include "system_error"
 #include "__undef_macros"
 
-#if defined(__unix__) &&  defined(__ELF__) && defined(__clang__)
+#if defined(__unix__) &&  defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
 #pragma comment(lib, "pthread")
 #endif