Internal functions.

.onAttach(lib, pkg, ...)