Make the test for the debug build case-insensitive
Debug build should not link the Release library
- Add missing HINTS to locate libs and headers on Linux without pkgconfig
- Fix detection of the debug library on Linux (tested on Mageia)