Interference effects in high-order harmonic generation by homonuclear diatomic molecules