RegionAdjacencyGraph: fix bug when using 32-bit labels.

Use getf with a cast to int to prevent errors.