Do not ever store non-target platforms as singletons

Let's test whether the current platform matches even *before* storing
the instances as singletons.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'platform-singletons'

This fixes the disappearing-menu-bar problem on platforms other than
MacOSX.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>