[d3d8] Fix CreateImageSurface implementation (with testcase)