Fix for #7924.

In versions below 2.7.3, shlex doesn't properly account for
unicode characters. This only occurred with Apache for some reason,
either because mod_wsgi uses Python_2.7.2+ or because Apache was
handing it Unicode strings.

This fix simply converts the string to ASCII before handing it to
shlex. Since the set of valid characters for an AS parameter are
'AS1234567890[],' and should always encode to ASCII, this should be
safe.