adds missing explicit conversion to bool of optional

Missing explicit conversion to bool caused Boost.MPI to fail to compile
with C++ > 11.

Fixes [trac #10282](https://svn.boost.org/trac/boost/ticket/10282).