Use memcpy instead of bcopy, and #define snprintf for win32.

Fixes more compile/link errors on win32.