Added support for locking the vertical scaling.
Fixed compilation and removed use of internal cfitsio.