Bug 961665 - Cross compilation fixup.
Bug 988271 - Fixed D3D SDK detection on mingw. r=mshal,jgilbert
Bug 820048 - Added missing math.h (mingw fixup).