Fix improper handling of alignment on OS X. Part of #473