change units to unit (depreciated in astropy 0.3)