For Ubuntu Touch on HTC vision, cloned from canonical and modified to fix compilation issues