std.math: Check if dmd-style inline asm is available

GDC doesn't support dmd style inline asm and gdc/mingw builds fail because of this.
I agree with @jpf91, doing it this way seems cleaner.