3DES/Rijndael/AES: Fix memory leak with CTR mode

Related to: https://github.com/phpseclib/phpseclib/issues/77