better robustness for detecting location of codec libraries (@maikel87, close #61)