Fix mac toolbar icon corruption

Because the image representation was stored in the pixmap
which was allocated on the stack -- it should be allocated on
heap since the underlying data is never actually copied.

This seems to fix the issue, but need to keep monitoring it!

Fixes #477.