--- crf/crfasgd.cpp.orig	2012-09-14 23:31:35.000000000 +0900
+++ crf/crfasgd.cpp	2013-12-30 10:07:41.000000000 +0900
@@ -40,7 +40,10 @@
 
 using namespace std;
 
-#if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
+# include <unordered_map>
+# define hash_map unordered_map
+#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
 # include <unordered_map>
 # define hash_map unordered_map
 #elif defined(__GNUC__)
--- crf/crfsgd.cpp.orig	2012-09-14 23:31:35.000000000 +0900
+++ crf/crfsgd.cpp	2013-12-30 10:07:52.000000000 +0900
@@ -40,7 +40,10 @@
 
 using namespace std;
 
-#if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
+# include <unordered_map>
+# define hash_map unordered_map
+#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
 # include <unordered_map>
 # define hash_map unordered_map
 #elif defined(__GNUC__)
--- svm/prep_rcv1.cpp.orig	2012-09-14 23:31:35.000000000 +0900
+++ svm/prep_rcv1.cpp	2013-12-30 10:08:13.000000000 +0900
@@ -31,7 +31,10 @@
 
 using namespace std;
 
-#if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
+# include <unordered_map>
+# define hash_map unordered_map
+#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
 # include <unordered_map>
 # define hash_map unordered_map
 #elif defined(__GNUC__)