Retrofits a #charpos method onto StringScanner in 1.9.3