cleanups for new buffer read

use vips8 API for buffer read/write stuff, if possible, it improves
compatibility

fix an oops in version #if-ing