Make sure code compiles on Ubuntu 12.04 with boost 1.46

Work with permissions in boost::filesystem was introduced in boost 1.49
diff --git a/src/dispatcher.cc b/src/dispatcher.cc
index 717fadb..390cb4a 100644
--- a/src/dispatcher.cc
+++ b/src/dispatcher.cc
@@ -235,7 +235,13 @@
     {
       m_actionLog->AddLocalActionUpdate (relativeFilePath.generic_string(),
                                          *hash,
-                                         last_write_time (absolutePath), status (absolutePath).permissions (), seg_num);
+                                         last_write_time (absolutePath), 
+#if BOOST_VERSION >= 104900
+                                         status (absolutePath).permissions (), 
+#else
+                                         0,
+#endif
+                                         seg_num);
 
       // notify SyncCore to propagate the change
       m_core->localStateChangedDelayed ();
@@ -473,7 +479,9 @@
         {
           if (filesystem::exists (filePath) &&
               filesystem::last_write_time (filePath) == file->mtime () &&
+#if BOOST_VERSION >= 104900
               filesystem::status (filePath).permissions () == static_cast<filesystem::perms> (file->mode ()) &&
+#endif
               *Hash::FromFileContent (filePath) == hash)
             {
               _LOG_DEBUG ("Asking to assemble a file, but file already exists on a filesystem");
@@ -491,7 +499,9 @@
         if (ok)
           {
             last_write_time (filePath, file->mtime ());
+#if BOOST_VERSION >= 104900
             permissions (filePath, static_cast<filesystem::perms> (file->mode ()));
+#endif
 
             m_fileState->SetFileComplete (file->filename ());
           }
diff --git a/src/fetcher.h b/src/fetcher.h
index 185e2a1..515b2e9 100644
--- a/src/fetcher.h
+++ b/src/fetcher.h
@@ -28,6 +28,7 @@
 #include "executor.h"
 #include <boost/intrusive/list.hpp>
 #include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <set>
 
 #include <set>
 
diff --git a/src/state-server.cc b/src/state-server.cc
index f0616b0..2d1d96a 100644
--- a/src/state-server.cc
+++ b/src/state-server.cc
@@ -463,7 +463,9 @@
         {
           if (filesystem::exists (filePath) &&
               filesystem::last_write_time (filePath) == file->mtime () &&
+#if BOOST_VERSION >= 104900
               filesystem::status (filePath).permissions () == static_cast<filesystem::perms> (file->mode ()) &&
+#endif
               *Hash::FromFileContent (filePath) == hash)
             {
               m_ccnx->publishData (interest, "OK: File already exists", 1);
@@ -481,7 +483,9 @@
       if (m_objectManager.objectsToLocalFile (deviceName, hash, filePath))
         {
           last_write_time (filePath, file->mtime ());
+#if BOOST_VERSION >= 104900
           permissions (filePath, static_cast<filesystem::perms> (file->mode ()));
+#endif
           m_ccnx->publishData (interest, "OK", 1);
         }
       else