Ported fix of https://github.com/Imgur/imgurpython/issues/17 to Objective C.