Use the AST `regex` property

This fixes an issue where non-regex literals were accidentally being transpiled.

This is a breaking change, because it removes support for ASTs generated by old versions of Esprima.