Update for astropy 0.3.
Backward compatibility with numpy < 1.8.