Update Tern and Acorn to the latest.

This fixes #6018 and possibly others.