bugfix: in freebsd, libthr may call calloc before globalinit