Fixed compile error: memcpy not defined

Could not compile on ArchLinux (with gcc 4.8.1) and Ubuntu. This change should fix that.