Replaying @serac's comment:
>If the IV becomes dynamic, you'll have to prepend two values: one 4-byte integer indicating the IV length followed by the IV bytes.