Fixed incorrect memcpy for Linux.