Fix bug with content length header not being set.

Turns out this is an Apple bug and requires some pretty gross looking code to fix it. See: https://github.com/AFNetworking/AFNetworking/issues/1398