patch field3d to work with boost-thread