improve diagnostic message when native method linking fails during tests