Fix issue #40

This fixes the issue where two close buttons are shown on the dock tabs
on OSX.