Fix build on all platforms that doesn't have memrchr() function,