Fix compiler warnings for imgtool