Switch from require("ast-types").proto to .defineMethod(name, func).

This is a follow-up to #17.