[hwc] Add support for legacy device version encoding