Fix narrowing conversion warning when building in c++11 mode on gcc