Build on boost::filesystem v3 and old boost

Tested against boost 1.40 and boost 1.52