Properly import astropy based on version number