fix casts; add missing BEGIN_C_DECLS; designated initializers; libstasis.so now builds + runs under both g++ and gcc!