workaround for buggy builtin memcpy function (this fixes freebsd stack)