Backwards incompatible change on `before_compile` and `after_compile`

Both callbacks now receive the environment as
first argument instead of the module.