fix type of the reference
fix #37

As pointed out in #36 there are a lot of other places where implicit
casting to 32bit integer values is happening...
Unfortunately, the g2o API has a lot of int in function declarations.
I'm not sure if explicit casting is the way to go. Maybe we should
clean up the API interface instead...