Support for building on MSYS

The version of `ExtUtils::MM_Win32` that currently ships with MSYS is quite old, and it does have none of the `cflags`, `test` or `distdir` functions, resulting in the following error:

    ERROR from evaluation of perl5-win32-api/Callback/Makefile.PL: Can't locate object method "cflags" via package "ExtUtils::MM_Win32" at ./Makefile.PL line 25.

So we need to test for these functions at runtime and do something reasonable if they don't exist.