[Boost] (minor) Add a static_cast to avoid a compiling warning in Xcode.