Correlation effects and the bonding in Mo2 and Cr2