Joint measurability through Naimark's dilation theorem