Replace implementation of C functions in runtime on OS X