replaced some deprecated Gestalt() calls for determining OS version at runtime