Use pkgname instead packageName() in .onAttach

packageName() is in utils, and not available automatically.