Twisted stable maps and quantum cohomology of stacks