Changes to make build independent of version of astropy

This refers to the last version that was generated, not the installed version (@embray can tell you for certain).  I think you want:

```
from astropy import __version__
```

The string comparison is probably fine for now, but it will fail if there's ever an astropy 1.10.  The usual way to handle this is to use the `distutils.version` module, which has utilities for comparing version strings.