adding mongoose pthread linkage