Bring over some of the platform-specific workarounds from astropy.io.fits
Merge pull request #49 from mdboom/platform-specific

Bring over some of the platform-specific workarounds from astropy.io.fits