add wrapper for missing mempcpy on freebsd