Make kMax size constants class members.
fix build error on Linux
strnstr -> strstr as the former is non-standard (thanks Bertrand!)
remove an unused variable