Build fixes for cfitsio