Implemented the #library directive and fixed loading icinga.dll on Windows.