use reallocf instead of realloc on OS X