name+security: Fixing bugs with empty name component comparison and failure handing in OSX tpm implementation

Change-Id: I5105bc87b382d7e515538fef6922f3516afc3bff
diff --git a/src/name-component.hpp b/src/name-component.hpp
index 4c3ecca..f88c081 100644
--- a/src/name-component.hpp
+++ b/src/name-component.hpp
@@ -251,7 +251,11 @@
   {
     if (value_size() != other.value_size())
       return false;
+    if (value_size() == 0 /* == other.value_size()*/)
+      return true;
 
+    // somehow, behavior is wrong on OSX 10.9 when component is empty
+    // (probably some bug in STL...)
     return std::equal(value_begin(), value_end(), other.value_begin());
   }