build-auto: fix notcmalloc detection