Fixed tests using pragma pack
Made alignment construct more cross-platform