Explicit using.
Code guards for platform-specific implementations.
(when not using cmake / catkin)
Fix broken ioctl calls, add exception handling.