Several fixes for building the library for typical integration w/ other projects