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
Merge pull request #12 from tstarling/memcmp-unix-excl

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