Added option to disable library building due to linker problems on OSX