port pack/unpack to mingw32.