Partially inspired by posts at
https://stackoverflow.com/questions/15599026/how-can-i-intercept-dlsym-calls-using-ld-preload
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit af8244e3e02690e251d24f38abbb1e7742250758)