Allow for `event_pkg_threshold` support.

PKG_MEM is not defined or use anywhere else in the code, so assuming `PKG_MALLOC` is meant here.
Merge pull request #139 from shimaore/pkg_mem_events

Allow for `event_pkg_threshold` support.

Credits go to Stéphane Alnet (shimaore)