channels/smartcard: fix some 64-bit handling issues