avoid using pthread cleanup push/pop in stdio when not needed