Added backward compatibility with Astropy 0.2