fixed for linux, where memcpy could not be found in the standard headers