Move include boost/shared_ptr inside HAVE_BOOST_SHARED_PTR
diff --git a/ndn-cpp/common.h b/ndn-cpp/common.h
index 805be36..3ea8442 100644
--- a/ndn-cpp/common.h
+++ b/ndn-cpp/common.h
@@ -13,23 +13,24 @@
#ifndef NDN_COMMON_H
#define NDN_COMMON_H
-#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include "../config.h"
-namespace ndn
-{
// Depending on where ./configure found shared_ptr, define the ptr_lib namespace.
-// We always use ptr_lib::shared_ptr.
+// We always use ndn::ptr_lib::shared_ptr.
#if HAVE_STD_SHARED_PTR
-namespace ptr_lib = std;
+#include <memory>
+namespace ndn { namespace ptr_lib = std; }
#elif HAVE_BOOST_SHARED_PTR
-namespace ptr_lib = boost;
+#include <boost/shared_ptr.hpp>
+namespace ndn { namespace ptr_lib = boost; }
#else
#error "Can't find shared_ptr in std or boost"
#endif
+namespace ndn
+{
typedef boost::posix_time::ptime Time;
typedef boost::posix_time::time_duration TimeInterval;