Use boost::filesystem v2 api if v3 not available

This allows tpie to build on CentOS 6 which ships with Boost 1.41 and does not support the Filesystem v3 api (requires Boost 1.44).