Add backwards-compatibility with Astropy 0.4