dng writer: fix rounding bug in rational conversion