[Mac] Replace obsolete POSIX functions

bcopy() and bzero() were obsoleted in POSIX 1.2001 and removed in
POSIX 1.2008.

Also set _POSIX_C_SOURCE=200809L macro so we don't accidentally
use them again.