Correctly handle headless system detection