src: Adding conditional compilation against boost or bundled "ndnboost"

Change-Id: Ic6a9718d6cad920ffa7a1b4d74851a338ac6f5da
diff --git a/src/security/certificate/public-key.cpp b/src/security/certificate/public-key.cpp
index f57f5a6..fc41a94 100644
--- a/src/security/certificate/public-key.cpp
+++ b/src/security/certificate/public-key.cpp
@@ -6,10 +6,19 @@
  * See COPYING for copyright and distribution information.
  */
 
+#include <ndn-cpp/common.hpp>
+
+#if NDN_CPP_USE_SYSTEM_BOOST
+#include <boost/iostreams/stream.hpp>
+#include <boost/iostreams/device/array.hpp>
+namespace ndnboost = boost;
+#else
 // We can use ndnboost::iostreams because this is internal and will not conflict with the application if it uses boost::iostreams.
 #include <ndnboost/iostreams/stream.hpp>
 #include <ndnboost/iostreams/device/array.hpp>
-#include <ndn-cpp/security//security-exception.hpp>
+#endif
+
+#include <ndn-cpp/security/security-exception.hpp>
 #include "../../c/util/crypto.h"
 #include "../../encoding/der/der.hpp"
 #include <ndn-cpp/security/certificate/public-key.hpp>