use Apple's flag instead of reinventing the wheel

solution for issue #28