channels/smartcard: some Mac OS X fixes