Add support for Mac OS X (fixing issue #1)