vmod_threescale: fix function to get substring between delimiters

Fix the function returning a substring between delimiters. /cc @mpguerra