Fixed boost linker errors, fixed threading