Some minor mingw64 porting tweaks from Glen.

llvm-svn: 163120
diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp
index 5f4d6b5..660ebfe 100644
--- a/libcxx/src/stdexcept.cpp
+++ b/libcxx/src/stdexcept.cpp
@@ -16,8 +16,13 @@
 #include <cstddef>
 #include "system_error"
 
-// Use <cxxabi.h> to determine whether we're linking against libc++abi.
-#if __has_include(<cxxabi.h>)
+#ifndef __has_include
+#define __has_include(inc) 0
+#endif
+
+#if __APPLE__
+#include <cxxabi.h>
+#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
 #include <cxxabi.h>
 #endif