Avoid implicit initializer narrowing.

See http://www.stroustrup.com/C++11FAQ.html#narrowing, which causes
a build error when compiling as C++11 with recent Apple LLVM Compiler
and libc++. Using an explicit cast works around the error, assuming the
truncation is semantically safe.