changed std::memcpy to memcpy, because apparently android doesn't have it