fix AFM#metrics_for to work across ruby 1.8, 1.9 and 2.0

* on 1.8 String#[] returns the character code at that position as an int
* on 1.9+ String#[] returns a single character string