don't crash when app.dock api is unavailable
don't crash when app.dock api is unavailable

The dock api is only available on osx and the dock object will be
completely missing on other systems. If it's unavailable don't bother
trying to set the badge

absullivan/friends,webcoding/friends,LinusU/friends,fritx/friends,halink0803/friends,ekmartin/friends,ekmartin/friends,Flet/friends,fritx/friends,joeynimu/friends,bright-sparks/friends,IQ2022/friends,bright-sparks/friends,joeynimu/friends,absullivan/friends,Flet/friends,halink0803/friends,LinusU/friends,webcoding/friends,IQ2022/friends