Add support for compiling on mingw (win32)

ideviceinstaller did not compile natively on mingw because of:
- use of asprintf and vasprintf methods which are not defined
- use of the nanosleep method which is part of POSIX and not availabe on Windows
- use of format strings such as %z which are not legal (by default) in mingw.

This patch fixes that.

This patch is based on the work done in the storoj/libimobiledevice-win32 repository; in particular, the asprintf.h file is taken from there.