[IO] BOOST_VERSION is defined only with version.hpp.

Otherwise it is undefined and the BOOST_VERSION preprocessor
condition took the first branch.