Add a fallback memrchr implementation for those platforms that dont support it. Bug #963.