Improved const pointer detection in the HPMHooking generator

- Fixes a HPMHooking compile error in d117462. Thanks to Potte.

Signed-off-by: Haru <haru@dotalux.com>