added a cast to circumvent a bug that appears on certain 32-bit GCC versions
cf. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43813