Fixed transferProgressCallback.

transferProgressCallback was incorrectly casting pointers leading to an EXC_BAD_ACCESS. This fixes that.