Fix GCC C++11 warning about narrowing conversion.