fix memccpy() in tool.c, thanks khindenburg

see macports ticket 41174