Added some OS detection and debugging option to the libderived.so compilation.