Fix the handling of unresolved pinvoke methods in full-aot mode.