Renamed macros to avoid clash in Solaris
Added workaround for lack of #pragma pack(push) in Solaris