portability: Fix packed attribute

Windows uses a different type of attribute packing.  Make this a
macro so it works on both platforms.