stringutils: protect EXPORTED_SYMBOLS in function closure

(integrated from trunk branch change e18dd52 by Todd Whiteman <toddw@activestate.com>)