fixes and extensiont to upstream gphoto2 / libgphoto2