Properly support stencil buffer on Windows