title: InvalidProgramException when creating a Timer using a delegate created by reflection
body: <p>This code:</p>
  
  <pre>
  var returnType = GetDelegateReturnType(typeof(TimerCallback));
  var methodParameters = typeof(TimerCallback).GetMethod("Invoke").GetParameters().Select(x => x.ParameterType).ToArray();
  
  var handler = new System.Reflection.Emit.DynamicMethod("", returnType, methodParameters, typeof(ArgumentNullTest));
  var generator = handler.GetILGenerator();
  
  generator.Emit(System.Reflection.Emit.OpCodes.Ldloc, 1);
  generator.Emit(System.Reflection.Emit.OpCodes.Ret);
  
  var timerCallback = (TimerCallback)handler.CreateDelegate(typeof(TimerCallback));
  var timer = new Timer(timerCallback, null, 0, 0);
  var timer2 = new Timer(o => { }, null, 0, 0);
  </pre>
  
  <p>throws an <code>InvalidProgramException</code> when creating the second timer.
  What am I doing wrong when creating the <code>TimerCallback</code> per reflection?</p>