Changes in order to avoid the use of usb compat.
These changes come mainly from the openphd guiding project. They still should be adapted a little more.