check if REQUEST is available in text_to_emoticons transform

In some cases request is not available here, e.g. when copying a
Plone site. This is a temp fix, we should make sure that this
doesn't break anything else.