Modifications to make it build on Fedora19

I submitted a pull-request earlier, but it contained some unnecessary commits. These modifications are necessary to build on fedora19 on gcc 4.8, I'd expect that the inclusion of the following line:
````
#include <boost/thread/lock_guard.hpp>
````

would be necessary on other flavors of linux as well.