Fix astropy version check