Compilation fixes for MSVC

Compilation fixes for Visual C++. Several ```using namespace std::tr1;``` declarations were causing redefinition errors with ```boost::shared_ptr```.

Tested on Visual C++ 2012 / boost 1.51.0 and gcc 4.7.2 / boost 1.48.0 (Fedora 17.)