Fix -Wc++11-narrowing warning.