Fix test failures on astropy master