Use constant time string comparison to avoid timing attacks.

Inspired by [twilio-java/#158](https://github.com/twilio/twilio-java/pull/158).