make recaptcha compatible with json forms and python 3

See the patch, it's quite self-explainatory