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

Otherwise it is undefined and the BOOST_VERSION preprocessor
condition took the first branch because undefined = 0.

This is bugfix to my previous commit https://github.com/ufz/ogs/pull/459.