Make compatible with astropy prior to 0.4