smartcard: fix PCSC detection/build on OS X

fixes #1683
smartcard: added missing defines for OS X
build: cleaned up and fixed PCSC detection
Merge pull request #1684 from bmiklautz/issue_1683

smartcard: fix PCSC detection/build on OS X