Fix warnings.
Check the cfg exception at the start of mono_method_to_ir (), to catch failures caused by mono_compile_create_var_for_vreg ().