A bag model calculation of the nucleon lifetime in grand unified theories