Backported an example to MSVC10