Fixes #3928: ptmalloc2 hooks disabling bug fix

---svn-pre-commit-ignore-below---

Custom patch from ticket based on:

r29720 [[BR]]
"If" statement wrapping with #if MEMORY_LINUX_UMMUNOTIFY in order to prevent ptmalloc2 hooks disabling in case if OMPI was not configured with ummunotify support.