Add a more portable version of pg_ensure_str_capa, that should work on Rubinius.