Getting static inititalization madness under control.

Prevent compiler optimization by exporting symbols of
static registration helpers. Not sure if this works when building
a static libary, but for DLL builds this gives additional safety.