some quick hacks for OS X libc