Added memmem() replacement in libcompat, and simple tests.