Dynamo regime transition among Sun-like stars in M 34 - A time evolution model of X-ray activity on the main sequence