fix invoke java callback in pthread