Fix tests compilation

Hi,
After the recently introduced USE_EXTERNAL_LIBS flag, tests were not compiling anymore, a variable is badly named. This pull request should fix this issue.
Regards.
Julien