Build on boost::filesystem v3 and old boost

Tested against boost 1.40 and boos 1.52