circumventing a GCC bug

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.

This bug appeared to show up with errors like "Cannot convert 'int' to 'std::vector<robot_state::RobotState*>::value_type" for my GCC 4.6.3 on my Ubuntu 12.04 32-bit.