Fix decryption on KitKat

Contributed by Isaac Potoczny-Jones in https://github.com/SURFnet/tiqr/issues/42 (patch adjusted to match formatting and code style).