Work around "invalid range in character class" (SpiderMonkey)