Fix #718 - memory error check fails on osx mavericks