Backported fix for #1287 - memchecker not working on osx yosemite