use Apple's flag instead of reinventing the wheel

solution for issue #28
Merge pull request #30 from ddrscott/patch-1

use Apple's flag instead of reinventing the wheel