The gnu extension __attribute syntax cannot be mixed with the
C++11 alignas specifier, so in order to use visibility attributes on
classes that also use alignas, we need to use the C++11 standard syntax.
Also fix a few warnings introduced by this change.