Fix build with clang-5.0

refs: #4547

Change-Id: I7fd0411b3dc7c62651875aa035bbfb6ca269bf81
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 384d4e9..71970ec 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -165,13 +165,13 @@
 {
   if (currentNeighbor != m_adjacencyList.getAdjList().end()) {
     ndn::FaceUri uri(currentNeighbor->getFaceUri());
-    uri.canonize([this, then, currentNeighbor] (ndn::FaceUri canonicalUri) {
+    uri.canonize([then, currentNeighbor] (ndn::FaceUri canonicalUri) {
         NLSR_LOG_DEBUG("Canonized URI: " << currentNeighbor->getFaceUri()
                    << " to: " << canonicalUri);
         currentNeighbor->setFaceUri(canonicalUri);
         then(std::next(currentNeighbor));
       },
-      [this, then, currentNeighbor] (const std::string& reason) {
+      [then, currentNeighbor] (const std::string& reason) {
         NLSR_LOG_ERROR("Could not canonize URI: " << currentNeighbor->getFaceUri()
                    << " because: " << reason);
         then(std::next(currentNeighbor));