Fix misuse of memcmp() where strcmp() was intended

This is a partial backport of http://www.sqlite.org/cgi/src/vinfo?name=d73435587b

It fixes an ASan error that HHVM routinely hits, if HHVM is patched to use malloc() for smart_alloc(), along the lines of https://github.com/tstarling/hiphop-php/tree/asan