Calculate matched groups by referencing the original ByteString.

This avoids a malloc() and memcpy() in haskell_re2_match().