Support string annotations for module name
When a file is marked "from __future__ import annotations", which is
default in Python 3.11, annotations are strings. The check for the
module name being str needs to check against the string 'str' in
addition to the symbol str.