fix warning of strnstr not defined on linux