Fix bug in IV setting.

Moved code to convert string to IV to allow for State.set_iv() to work
with non-string entries.