Fix warning

Integers of different signs are being compared here. It is safe to assume that CFDataGetLength(encoder) will return 0 or a positive int, so an explicit cast is used to silence the warning.