Fixed a bug when passing a null library to AddBTLibrary.