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.
Merge pull request #1 from larryv/master

Avoid implicit initializer narrowing to enable C++11 build.