Only use app.dock when defined
Only use app.dock when defined

It's only defined on macOS so we shouldn't use it on other platforms

Auditors: @aekeus

Fix #8548

diasdavid/browser-laptop,luixxiul/browser-laptop,timborden/browser-laptop,timborden/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop,timborden/browser-laptop,diasdavid/browser-laptop,timborden/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop,luixxiul/browser-laptop