VS2013 compat changes

Use #pragma pack instead of __attribute__((packed))
Include cstdint in more places it's used, rather than relying on other
standard-library headers to happen to define the typedefs