Fix for crash on Windows

callback delegate on unmanaged code get collected, see
http://stackoverflow.com/q/7302045