Clone from http://cgit.drupalcode.org/captcha