(D3D) Move d3d_free to d3d_shared.h