
Step 1
Right-click on the taskbar
Choose the properties dialog.
Select the small icons checkbox
Step 2
Under the taskbar buttons setting,
Choose combine when taskbar is full. It's not pixel-perfect in accuracy, but it's close from a functionality point of view.