use memcmp instead of strncmp in C++ scanner

We already know the actual string length, so there is no point
in having the function figure it out itself.

Change-Id: I34303ba07e46c634dac42228479ed59ae2966592
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>